module TagHelper
  def tag_name(tag)
    tag.gsub(/\(\d+\)$/, '')
  end
  
  def tag_qty(tag)
    tag.gsub(/(.+)(\(\d+\))$/, '\2')
  end
end
